<?php 
// 判断是否为ajax请求
// if (!(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')){
// 	return false;
// }

require '../../source/class/class_core.php';
$discuz = C::app();
$discuz->init();


// 当前用户id
$uid = isset($_G['uid'])?$_G['uid']:'';
if(!$uid){
	echo 0;
	return;
}

$user_info = DB::fetch_first("SELECT a.username,b.gender FROM ".DB::table('common_member')." a inner join ".DB::table('common_member_profile')." b on a.uid=b.uid WHERE a.uid='$uid'");

// 整合返回用户信息
$return = '';
// 返回数据                  性别 0:保密 1:男 2:女
if($user_info){
	if(is_array($user_info)){
		$return .= "uname=>".$user_info['username'].'#sex=>'.$user_info['gender'];
		echo $return;
		return;
	}
}else{
	echo 0;
	return;
}
 ?>